package com.ruoyi.shbData.domain.pad;


import com.ruoyi.common.core.pad.LinePoint;
import com.ruoyi.common.utils.calculate.BezierCurveUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
@ApiModel("泵效图单条曲线对象")
public class ShbChartLineDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("最大值")
    private float maxVel = 1f;
    @ApiModelProperty("最小值")
    private float minVel = 0f;
    @ApiModelProperty("曲线测试集合")
    private List<LinePoint> linePoints = new ArrayList<>();
    @ApiModelProperty("曲线贝塞尔曲线控制点")
    private List<LinePoint> controlLinePoints = new ArrayList<>();
    private String msg;

    public ShbChartLineDTO(float maxVel, float minVel, List<LinePoint> linePoints) {
        this.maxVel = maxVel;
        this.minVel = minVel;
        this.minVel = Math.max(this.minVel, 0f);
        this.linePoints = linePoints;
    }

}
